<template>
  <a-timeline v-for="(item, key) in data" :key="key">
    <a-timeline-item :label="item.createTime.slice(0, 10)" lineType="dashed">
      {{ item.name }}
      <br />
      <a-typography-text
        type="secondary"
        :style="{ fontSize: '12px', marginTop: '4px' }"
      >
        {{ item.context }}
      </a-typography-text>
    </a-timeline-item>
  </a-timeline>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { AnnouncementControllerService } from "../../../generated";

const data = ref([]);

const loadData = () => {
  AnnouncementControllerService.listPageUsingPost(1, 5).then((res: any) => {
    data.value = res.data;
  });
};

loadData();
</script>

<style scoped></style>
